<include file="Public:header" />

<div class="table-tit">推广方案列表 <a href="{:U('Sett/indexadd')}" class="pull-right">新增</a></div>
<table class="table table-bgfont">
    <tr>
        <th>ID</th>
        <th>方案名称</th>
        <th>方案类型</th>
        <th>达标金额</th>
        <th>优惠</th>
        <th>限制金额</th>
        <th>状态</th>
        <th>更新时间</th>
        <th>管理</th>
    </tr>
    <volist name="data.data" id="v">
        <tr>
            <td>{$v.pre_id}</td>
            <td>{$v.pre_name}</td>
            <td>
                <switch name='v.pre_type'>
                    <case value='1'>满减优惠</case>
                    <case value='2'>直降优惠</case>
                    <case value='3'>赠品优惠</case>
                    <case value='4'>打折优惠</case>
                </switch>
            </td>
            <td>{$v.pre_trimoney}</td>
            <td>{$v.pre_ratio}</td>
            <td>{$v.pre_maxmoney}</td>
            <td>
                <if condition="$v.pre_status eq 1">
                    <button type="button" class="btn btn-success btn-xs">使用中</button>
                    <else />
                    <button type="button" class="btn btn-danger btn-xs">停止</button>
                </if>
            </td>
            <td>{$v.pre_time|date='Y-m-d H:i:s',###}</td>
            <td>
                <a href="{:U('Sett/indexedit','pid='.$v['pre_id'])}">
                    <button type="button" class="btn btn-xs btn-primary">编辑</button>
                </a>
                <a href="{:U('Sett/index')}">
                    <button type="button" class="btn btn-xs btn-danger">删除</button>
                </a>
            </td>
        </tr>
    </volist>
    <tr>
        <td colspan="9">{$data.page}</td>
    </tr>
</table>

<include file="Public:footer" />
